<template>
  <router-view />
</template>
<script lang="ts" setup>
import { ref, onMounted } from "vue";
import { useRouter } from "vue-router";
import { User, Wap } from "../../common/wap";

//用户登录信息
// let UserInfo: LoginUserInfoTy | null = null;
const loginMk = ref(false);
const router = useRouter();

onMounted(() => {
  new User({
    onData() {
      let isLogin = this.isLogin;
      if (!isLogin) {
        Wap.delayTodo(() => {
          router.push("/");
        });
      }
      loginMk.value = isLogin;
      // UserInfo = this.info;
    },
  });
});
</script>
